package com.bhp.bencaoguoyi.commom.web;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @ClassName GlobalExceptionHandler
 * @Description TODO
 * @Author 包海鹏
 * @Date 2020/6/18 10:31
 * @Version 1.0
 **/
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(value = Exception.class)
    public AjaxResult error(Exception e) {
        e.printStackTrace();
        return AjaxResult.error();
    }

}
